package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.LargeBusiness;
import es.ats.codington.festival.domain.Place.Zone;


public class LargeBusinessMapper implements RowMapper<LargeBusiness>{

	@Override
	public LargeBusiness mapRow(ResultSet resultSet, int numRow) throws SQLException {
		LargeBusiness largeBusiness = new LargeBusiness();
		

		largeBusiness.setIdPlace(resultSet.getInt("idPlace"));
		largeBusiness.setPlaceName(resultSet.getString("placeName"));
		largeBusiness.setZone(Zone.NORTH);
		largeBusiness.setCapacity(resultSet.getInt("capacity"));
		largeBusiness.setLargeBusinessName(resultSet.getString("largeBusinessName"));
			
			
		return largeBusiness;
	}

}
